<?php
namespace app\admin\validate;

use think\Validate;

class Module extends Validate
{
    protected $rule = [
        'name'  => 'require',
        'route' => 'unique:module|notIn:admin,base,extra',
    ];
    protected $message = [
        'name.require' => '模块名称为必填项',
        'route.unique' => '模块路径已存在',
        'route.notIn'  => '模块路径已存在',
    ];
    protected $scene = [
        'edit' => [
            'name',
            'route',
        ],
    ];
}
